package com.rpay.web.service;

import com.rpay.common.dto.feedback.FeedbackDTO;
import com.rpay.service.feedback.IFeedbackService;
import com.rpay.web.param.PostFeedback;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author XXX
 * @mail XXX@hotmail.com
 * @date 2018/5/12
 * @Description:
*/
@Service
public class FeedbackService {
    @Autowired
    private IFeedbackService iFeedbackService;

    public boolean add(PostFeedback postFeedback) {
        FeedbackDTO feedbackDTO = null;
        feedbackDTO = new FeedbackDTO();
        feedbackDTO.setFeedbackTitle(postFeedback.getFeedbackTitle());
        feedbackDTO.setFeedbackDesc(postFeedback.getFeedbackDesc());
        feedbackDTO.setUsername(postFeedback.getUsername());
        feedbackDTO.setPhone(postFeedback.getPhone());
        feedbackDTO.setEmail(postFeedback.getEmail());
        feedbackDTO.setAddress(postFeedback.getAddress());
        iFeedbackService.saveFeedback(feedbackDTO);
        return true;
    }
}
